<template>
  <div style="width: 1000px;margin: 0 auto">
    <div>
      <el-card>
        <h2 style="color: orange;text-align: center">
          {{tweet.title}}
        </h2>
        <p style="font-size: 12px;color: #666;text-align: center">
          作者:{{tweet.authorName}}&nbsp&nbsp&nbsp&nbsp&nbsp|&nbsp&nbsp&nbsp&nbsp&nbsp发布时间: {{tweet.gmtCreate}}&nbsp&nbsp&nbsp&nbsp&nbsp|&nbsp&nbsp&nbsp&nbsp&nbsp阅读次数:{{tweet.clickCount}}
        </p>
        <el-divider></el-divider>
        <div >
          <el-card style="font-size: 12px">
            <b style="color: #0aa1ed">摘要:</b>
            {{tweet.brief}}
          </el-card>
          <p>{{tweet.content}}</p>
        </div>
      </el-card>
    </div>
  </div>
</template>

<script>

export default {
  data(){
    return{
      tweet:{},
      dialogFormVisible:false,
    }
  },
  methods:{
    loadTweet(){
      let id = JSON.parse(this.$route.query.id);
      let url="http://localhost:8090/tweets/get-tweetId-tweets/"+id;
      this.axios.get(url).then((response) => {
        let jsonResult = response.data;
        if (jsonResult.state == 20000) {
          this.tweet = jsonResult.data;
        }
      })
    }
  },
  mounted() {
    this.loadTweet()
  }
}
</script>

<style scoped>

</style>